import request from '@/utils/request'

// 查询返修领料列表
export function listSentrance(query) {
  return request({
    url: '/TRepairMaterialInspect/TRepairMaterialInspect/list',
    method: 'get',
    params: query
  })
}
// 子列表
export function listSentranceChild(query) {
  return request({
    url: '/TRepairMaterialInspect/TRepairMaterialInspect/childlist/' + query.id,
    method: 'get',
    params: query
  })
}
// 查询返修领料详细
export function getSentrance(id) {
  return request({
    url: '/TRepairMaterialInspectPart/TRepairMaterialInspectPart/' + id,
    method: 'get'
  })
}

// 修改返修领料
// export function updateSentrance(data) {
//   return request({
//     url: '/TRepairMaterialInspect/TRepairMaterialInspect',
//     method: 'put',
//     data
//   })
// }

// 检验
export function submitSentrance(data) {
  return request({
    url: '/TRepairMaterialInspectPart/TRepairMaterialInspectPart',
    method: 'put',
    data
  })
}
// 多选检验
export function submitSentranceBatch(data) {
  return request({
    url: '/TRepairMaterialInspectPart/TRepairMaterialInspectPart/batchApproval',
    method: 'put',
    data
  })
}

// 更改合格证号
export function repairMaterialPart(data) {
  return request({
    url: '/TRepairMaterialInspectPart/TRepairMaterialInspectPart',
    method: 'put',
    data
  })
}
